package com.ruoyi.client.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.client.mapper.SysBuyCarMapper;
import com.ruoyi.client.domain.SysBuyCar;
import com.ruoyi.client.service.ISysBuyCarService;

/**
 * 购物车 Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-09-23
 */
@Service
public class SysBuyCarServiceImpl implements ISysBuyCarService 
{
    @Autowired
    private SysBuyCarMapper sysBuyCarMapper;

    /**
     * 查询购物车 
     * 
     * @param carId 购物车 主键
     * @return 购物车 
     */
    @Override
    public SysBuyCar selectSysBuyCarByCarId(Long carId)
    {
        return sysBuyCarMapper.selectSysBuyCarByCarId(carId);
    }

    /**
     * 查询购物车 列表
     * 
     * @param sysBuyCar 购物车 
     * @return 购物车 
     */
    @Override
    public List<SysBuyCar> selectSysBuyCarList(SysBuyCar sysBuyCar)
    {
        return sysBuyCarMapper.selectSysBuyCarList(sysBuyCar);
    }

    /**
     * 新增购物车 
     * 
     * @param sysBuyCar 购物车 
     * @return 结果
     */
    @Override
    public int insertSysBuyCar(SysBuyCar sysBuyCar)
    {
        return sysBuyCarMapper.insertSysBuyCar(sysBuyCar);
    }

    /**
     * 修改购物车 
     * 
     * @param sysBuyCar 购物车 
     * @return 结果
     */
    @Override
    public int updateSysBuyCar(SysBuyCar sysBuyCar)
    {
        return sysBuyCarMapper.updateSysBuyCar(sysBuyCar);
    }

    /**
     * 批量删除购物车 
     * 
     * @param carIds 需要删除的购物车 主键
     * @return 结果
     */
    @Override
    public int deleteSysBuyCarByCarIds(Long[] carIds)
    {
        return sysBuyCarMapper.deleteSysBuyCarByCarIds(carIds);
    }

    /**
     * 删除购物车 信息
     * 
     * @param carId 购物车 主键
     * @return 结果
     */
    @Override
    public int deleteSysBuyCarByCarId(Long carId)
    {
        return sysBuyCarMapper.deleteSysBuyCarByCarId(carId);
    }
}
